{% extends "base.html" %}

{% block title %}
  Create an account | {{ block.super }}
{% endblock %}

{% block content %}
  <h2>Create an account</h2>
  
  <form class="regform" action="." method="post" accept-charset="utf-8">
    {% if form.has_errors %}
      <h3 class="error">Please correct the error{{ form.error_dict|pluralize }} below.</h3>
    {% endif %}
    
    <h3><label for="id_username">Username:</label></h3>
    <p>
      {{ form.username }} 
      {% if form.username.errors %}
        <span class="error">{{ form.username.errors|join:", " }}</span>
      {% endif %}
    </p>

    <h3><label for="id_username">Email address:</label></h3>
    <p>
      {{ form.email }} 
      {% if form.email.errors %}
        <span class="error">{{ form.email.errors|join:", " }}</span>
      {% endif %}
    </p>
    
    <h3><label for="id_password1">Password:</label></h3>
    <p>
      {{ form.password1 }} 
      {% if form.password1.errors %}
        <span class="error">{{ form.password1.errors|join:", " }}</span>
      {% endif %}
    </p>

    <h3><label for="id_password2">Password (again):</label></h3>
    <p>
      {{ form.password2 }} 
      {% if form.password2.errors %}
        <span class="error">{{ form.password2.errors|join:", " }}</span>
      {% endif %}
    </p>

    <p><input class="button", type="submit" value="Create account"></p>
  </form>
  
{% endblock %}
